﻿package frEngine.shader.filters
{
    import __AS3__.vec.*;
    import baseEngine.core.*;
    import flash.utils.*;
    import frEngine.shader.*;

    public class FilterBase extends Object
    {
        public var texture3DList:Vector.<Texture3D>;
        public var type:int = 0;
        protected var _priority:int = 0;
        public static const ATLFormat:Array = ["", ",dxt1", ",dxt5", "", ""];

        public function FilterBase(param1:int, param2:int, param3:Array = null)
        {
            this.type = param1;
            this._priority = param2;
            param3 = param3 ? (param3) : ([]);
            this.texture3DList = this.Vector.<Texture3D>(param3);
            return;
        }// end function

        public function setRegisterParams(param1:Program3dRegisterInstance) : void
        {
            var _loc_2:* = getQualifiedClassName(this);
            throw new Error("请覆盖重写" + _loc_2 + ":setRegisterParams方法<from FilerBase.as>");
        }// end function

        public function get programeId() : String
        {
            var _loc_1:* = getQualifiedClassName(this);
            throw new Error("请覆盖重写" + _loc_1 + ":programeId方法<from FilerBase.as>");
        }// end function

        public function get priority() : int
        {
            return this._priority;
        }// end function

        public function dispose() : void
        {
            var _loc_1:int = 0;
            var _loc_2:Texture3D = null;
            if (this.texture3DList)
            {
                _loc_1 = 0;
                while (_loc_1 < this.texture3DList.length)
                {
                    
                    _loc_2 = this.texture3DList[_loc_1];
                    _loc_1++;
                }
                this.texture3DList.length = 0;
                this.texture3DList = null;
            }
            return;
        }// end function

        public function createVertexCode(param1:Program3dRegisterInstance, param2:int) : String
        {
            return "";
        }// end function

        public function createFragmentUvCoord(param1:Program3dRegisterInstance) : String
        {
            return "";
        }// end function

        public function createFragmentColor(param1:Program3dRegisterInstance, param2:Boolean) : String
        {
            return "";
        }// end function

        public function clone() : FilterBase
        {
            return this;
        }// end function

        public function update() : void
        {
            return;
        }// end function

        public static function getSmapleString(param1:String, param2:int, param3:Boolean, param4:int, param5:String = "linear") : String
        {
            var _loc_6:* = true ? ("2d") : ("cube");
            var _loc_7:* = param4 == Texture3D.MIP_NONE ? ("mipnone") : ("miplinear");
            var _loc_8:* = param3 ? ("repeat") : ("clamp");
            var _loc_9:* = ATLFormat[param2];
            return param1 + " <" + _loc_6 + "," + param5 + "," + _loc_7 + "," + _loc_8 + _loc_9 + ">";
        }// end function

    }
}
